import instance from "@/utils/request";

//获得用户信息
export function getDepartments(){
    return instance({
        url:'/company/department'
    })
}

//删除用户信息
export function delDepartments(id){
    return instance({
        url:`/company/department/${id}`,
        method:'DELETE'
    })
}

//得到负责人信息
export function getSimple(){
    return instance({
        url:'/sys/user/simple'
    })
}

//新增部门
export function addDepartments(data){
    return instance({
        url:'/company/department',
        method:'POST',
        data
    })
}

//编辑部门
export function editDepartments(id){
    return instance({
        url:`/company/department/${id}`
    })
}

export function editInfo(data){
    return instance({
        url:`/company/department/${data.id}`,
        method:'PUT',
        data
    })
}